<div class="box box-solid">
    <div class="box-body table-responsive no-padding">
        <form role="form" method="post" enctype="multipart/form-data">
            <div class="nav-tabs-custom">
                       <div class="tab-content">
                <div class="tab-pane active" id="tab_1">
                    <div class="box-body">
                        <div class="form-group">
                            <label>显示分类名称</label>
                            <input type="text" class="form-control" name="data[name]" id="name" value="">
                        </div>
                        <div class="form-group">
                            <label>分类</label>
                            <div class="controls">
                                <?php if(!empty($categories)) :?>
                                    <?php foreach ($categories as $key => $value) :?>
                                        <label style="margin-right:20px;">
                                            <?php echo $value['name'] ?>
                                            <input <?php if(!empty($has_categories) && in_array($value['sid'], $has_categories)) echo 'disabled'?> value="<?php echo $value['sid'] ?>" name="data[categories][]" type="checkbox" />
                                        </label>
                                            
                                    <?php endforeach; ?>
                                <?php endif; ?>
                            </div>
                        </div>
                        
                    </div>
                </div>
                
                
            </div>
        </div>
            <div class="box-footer">
                <button class="btn btn-primary" type="submit">添加</button>
                <a href="<?php echo $this->createUrl('system/category'); ?>">返回列表</a>
            </div>
        </form>
    </div>
</div>